package main

import (
	"fmt"
	"unsafe"
)

const (
	x = "abc"
	y = len(x)
	z = unsafe.Sizeof(x)
)

func main() {
	//使用const声明常量
	const LENGTH int = 10
	const WIDTH int = 5
	var area int
	const a, b, c = 1, false, "str" //多重赋值

	area = LENGTH * WIDTH
	fmt.Printf("面积为 : %d\n", area)
	println()
	println(a, b, c)

	//const可以用作枚举类型
	fmt.Println(x, y, z)
}
